package com.sporadic.desk.pojo;
import	java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @program: sporadic
 * @description:
 * @author: LHD   QQ:1727865856
 * @create: 2019-10-15 13:20
 **/
@Data
@TableName("goods") //配置表名
public class Goods {
    @TableId(type = IdType.AUTO) //说明主键自增
    @TableField(value = "id") //配置字段名
    private Integer id;
    @TableField(value = "goodsName")
    private String goodsName; //如果属性名和数据库字段名相同则不用使用@TableFild注解  例如属性名为goodsName 生成的sql字段为goods_name
    @TableField(value = "billStatus")
    private Integer billStatus;
    @TableField(value = "goodsDistrict")
    private Integer goodsDistrict;
    @TableField(value = "goodsPrice")
    private BigDecimal price;
    @TableField(value = "goodsCount")
    private Integer count;
    @TableField(value = "creationTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") //解决日期类型转为json成为时间戳,timezone解决8小时时差
    private Date creationTime;
}
